#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Project: spd-sxmcc
"""
@author: lyndon
@time Created on 2018/11/8 14:54
@desc
"""


class NotHasIndexError(Exception):
    def __init__(self, error_info):
        # super().__init__(self)  # 初始化父类
        self.error_info = error_info

    def __str__(self):
        return self.error_info


class NotHasTypeError(Exception):
    def __init__(self, error_info):
        # super().__init__(self)  # 初始化父类
        self.error_info = error_info

    def __str__(self):
        return self.error_info


if __name__ == '__main__':
    try:
        raise NotHasIndexError('没有指定Index，请指定IndexName')
    except NotHasIndexError as e:
        print(e)
